/* strtok example */
#include <stdio.h>
#include <string.h>
#include <iostream>
using namespace std;
int main ()
{
    char str[] ="15 This,a,sample,string";
    char * pch;
    printf ("Splitting string \"%s\" into tokens:\n",str);
    pch = strtok (str," ");
    //cout << pch << endl;
    while (pch != NULL)
    {
        printf ("%s\n",pch);
        pch = strtok (NULL, ",");
    }
    return 0;
}
